package phone.book;



import android.app.Activity;
import android.content.Intent;
import android.os.Bundle;
import android.view.View;
import android.view.View.OnClickListener;
import android.widget.Button;
import android.widget.EditText;

public class log_in extends Activity {
	
	
	private EditText UserName;
	private EditText Password;

	public static String userName;
	public static String pass;
	public static String sheetName = "Shopping List";
	
	@Override
	protected void onCreate(Bundle savedInstanceState) {
		
		// TODO Auto-generated method stub
		
		
		super.onCreate(savedInstanceState);
		setContentView(R.layout.log_in);
		
		UserName = (EditText) findViewById(R.id.userName);
		Password = (EditText) findViewById(R.id.password);
		
		Button b = (Button) findViewById(R.id.button1);
		Button b1 = (Button) findViewById(R.id.button2);
		b.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				
				userName = UserName.getText().toString();
				pass = Password.getText().toString();
			
				
				Intent i=new Intent(getApplicationContext(),import_contacts.class);
				i.putExtra("userName", userName);	
				i.putExtra("pass", pass);	
				startActivityForResult(i, 0);
				
				finish();
			}

		});
		
		b1.setOnClickListener(new OnClickListener() {
			
			public void onClick(View v) {
				finish();
			}
			});
		
		
	}
	
	
		
}
	


